Computing a non-linear function ƒ(x) in hardware or embedded systems can be very complex and resource intensive. Typically, a Taylor series expansion is used to approximate a non-linear function. However, approximation of a non-linear function ƒ(x) using Taylor series expansion may be computationally inefficient, as such approximation may require significant memory and processing time. There is currently a need for techniques to calculate an arbitrary nonlinear function more efficiently in hardware in which such techniques provide increased accuracy of the computation of the nonlinear function while reducing memory usage and/or processing time.